package simple.alert.rule.condition;

public enum BasicCondition {
	
	ABOVE("高于") {
		public boolean isMatch(long value, long threshold) {
			return value > threshold;
		}
	},
	BELOW("低于") {
		public boolean isMatch(long value, long threshold) {
			return value < threshold;
		}
	},
	EQUAL("等于") {
		public boolean isMatch(long value, long threshold) {
			return value == threshold;
		}
	};

	private String desc;

	private BasicCondition(String desc) {
		this.desc = desc;
	}

	public String getDesc() {
		return desc;
	}
	
	public abstract boolean isMatch(long value, long threshold);

}